//---------------------------------------------------------------------------- // File: ComSafeMem.h -- Common Safe Memory Usage // Type: Global Definitions. // Author: Ken Anderson // Date: 5/15/4--10:40PM // OS dependant: N/A // // Notes: Contains function calls to memory allocation & destruction through // safe methods. // // Header file's required: // 1) -- Provides Standard C\C++ Memory management. //---------------------------------------------------------------------------- #include //-------------Safe Destruction of Memory--------------------// //Safe Delete makes sure that null pointers are not destroyed. #ifndef SDELETE #define SDELETE(obj) if(obj!=NULL){delete obj; obj = NULL;} #endif //Safe Release make sure that null handles are not destroyed. #ifndef SHDELETE #define SHDELETE(pObj) if(pObj){if(*pObj){delete *pObj; *pObj = NULL;}} #endif